/*
 * @Description: 
 * @Author: sanghx
 * @Date: 2020-07-04 16:59:03
 * @LastEditors: sanghx
 * @LastEditTime: 2020-07-11 13:25:56
 */
import request from '@/utils/request';

const api = process.env.NODE_ENV === "production" ? "https://gitee.com/api/v5" : "/api"
export function test(id) {
  return request({
    url: `${api}/users/${id}`,
    method: 'get',
  });
}

export function user(name) {
  return request({
    url: `${api}/users/${name}`,
    method: 'get',
  });
}

export function followers(name) {
  return request({
    url: `${api}/users/${name}/followers`,
    method: 'get',
  });
}

export function following(name) {
  return request({
    url: `${api}/users/${name}/following`,
    method: 'get',
  });
}
export function repos(name) {
  return request({
    url: `${api}/users/${name}/repos`,
    method: 'get',
  });
}